package d0324;

import oracle.jrockit.jfr.openmbean.ProducerDescriptorType;

import java.lang.reflect.Array;
import java.util.Arrays;

public class TestSort {
    public static void main(String[] args) {
        Product p1=new Product("巧克力",45.5,1);
        Product p2=new Product("书",25.5,2);
        Product p3=new Product("衣服",145.5,3);
        Product p4=new Product("手机",3345.5,4);
        Product[]products=new Product[]{p1,p2,p3,p4};
        Arrays.sort(products);
        for (Product prod:products){
            System.out.println(prod);
        }

    }
}
